<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" buffer="8kb"%>
<%@ taglib uri="http://www.vhypnus.com/ec" prefix="ec"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%@include file="/common.jsp"%>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/test.js"></script>
</head>
<ec:dataset name="ds"></ec:dataset>
<body onload="initpage()">
	<fieldset
		style="width: 98%; height =95%;; text-align: left; COLOR: #ff9900; margin-left: 2px;">
		<legend>查询</legend>
		<table style="width: 100%" border="0" cellpadding="2">
			<tbody>
				<tr>
					<td class="td-label">用户编码</td>
					<td class="td-text"><ec:texttest id="userCode" title="用户编码"
							field="userCode" dataset="ds"
							styleclass="easyui-validatebox" type="text"
							dataoptions="required:false,validType:'minLength[6]'"></ec:texttest></td>
					<td class="td-label">姓名</td>
					<td class="td-text"><ec:texttest
							styleclass="easyui-validatebox" id="name" field="name"
							dataset="ds" type="text" title="name" dataoptions="validType:'maxLength[12]'"></ec:texttest></td>
					<td class="td-label">性别</td>
					<td class="td-text"><ec:comboboxtest id="sex" title="sex"
							field="sex" dataset="ds" styleclass="easyui-combobox"
							type="combobox"
							dataoptions="valueField:'id',textField:'text',width:150,panelHeight:'auto'"></ec:comboboxtest></td>

					<td class="td-label">出生年月</td>
					<td class="td-text"><ec:datepickertest id="birth" title="birth"
							type="datebox" field="birth" dataset="ds"
							styleclass="easyui-datebox"></ec:datepickertest></td>
					<td class="td-label">用户邮箱</td>
					<td class="td-text"><ec:texttest id="email"
							field="validatebox" dataset="ds" title="email"
							styleclass="easyui-validatebox" type="text"
							dataoptions="required:true,validType:'email'"></ec:texttest></td>
				</tr>
				<tr>
					<td class="td-label">描述</td>
					<td class="td-text" colspan=2><textarea name="message" rows=2></textarea>
					</td>
				</tr>
			</tbody>
		</table>
	</fieldset>

	<fieldset
		style="width: 98% ;height:95% ; text-align: left; COLOR: #ff9900; margin-left: 2px;">
		<legend>编辑</legend>
		<div id="tb" class="easyui-pagination" data-options="buttons:buttons"
			style="border: 1px solid #ddd;"></div>
		<ec:gridtest id="dg" styleclass="easyui-datagrid" type="grid" dataset="ds"
			title="Row Editing DataGrid"
			dataoptions="
				iconCls: 'icon-edit',
				singleSelect: 'true',
				toolbar: '#tb',
				width:'auto',
				height:'auto'">
				<ec:column id="id" field="id" dataset="ds"
				datatype="string"
				dataoptions="width:80,hidden:true"></ec:column>
				
			<ec:column id="itemid" field="itemid" dataset="ds"
				datatype="string"
				dataoptions="width:80,title:'Item ID',editor:'validatebox'"></ec:column>
			<ec:column id="productid" field="productid" dataset="ds"
				dataoptions="width:100,title:'Product',
						formatter:function(value,row){
							return row.productname;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'productid',
								textField:'productname',
								width:100,
								required:true,
								editable : false 
							}
						}"></ec:column>
			<ec:column id="listprice" field="listprice" dataset="ds" datatype="bigdecimal"
				dataoptions="width:80,align:'right',title:'List	Price', editor:{type:'numberbox',options:{precision:1}}"
				dataset="ds"></ec:column>
			<ec:column id="unitcost" field="unitcost" dataset="ds"
				datatype="bigdecimal"
				dataoptions="width:80,align:'right',title:'Unit Cost',editor:{type:'numberbox',options:{required:true}}"></ec:column>
			<ec:column id="attr1" field="attr1" dataset="ds"
				datatype="string"
				dataoptions="width:250,title:'Attribute',editor:'text'"></ec:column>
			<ec:column id="status" field="status" dataset="ds"
				datatype="int"
				dataoptions="width:60,align:'center',title:'Status',editor:{type:'checkbox',options:{on:'P',off:''}}"></ec:column>

<ec:column id="birthday" field="birthday" dataset="ds" dateformat="yyyy-MM-dd"
				datatype="date"
				dataoptions="width:100,align:'center',title:'birthday',editor:{type:'datebox',options:{width:100}}"></ec:column>

		</ec:gridtest>
	</fieldset>

</body>
<ec:init action="aaa" method="bbbb"></ec:init>
</html>